<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.3" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon.ico?v=5.1.3">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon.ico?v=5.1.3">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.ico?v=5.1.3">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.3" color="#222">





  <meta name="keywords" content="签到,PHP" />










<meta name="description" content="所需工具 WinSCP 官网下载 PuTTYGen 官网下载, softpedia Tieba-Cloud-Sign Github  步骤 注册 Openshift 账号  进入控制台选择Creat your first application 下拉列表选择 PHP 5.4 填写应用名字跟自定义域名，执行 create application创建 导航菜单进入 Application 页面，进入生">
<meta name="keywords" content="签到,PHP">
<meta property="og:type" content="article">
<meta property="og:title" content="Openshift 搭建 - 贴吧云签到">
<meta property="og:url" content="http://hexo.mantoujun.top/2017/04/30/Openshift-搭建-贴吧云签到/index.html">
<meta property="og:site_name" content="未知领域">
<meta property="og:description" content="所需工具 WinSCP 官网下载 PuTTYGen 官网下载, softpedia Tieba-Cloud-Sign Github  步骤 注册 Openshift 账号  进入控制台选择Creat your first application 下拉列表选择 PHP 5.4 填写应用名字跟自定义域名，执行 create application创建 导航菜单进入 Application 页面，进入生">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2017-04-30T09:55:58.900Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Openshift 搭建 - 贴吧云签到">
<meta name="twitter:description" content="所需工具 WinSCP 官网下载 PuTTYGen 官网下载, softpedia Tieba-Cloud-Sign Github  步骤 注册 Openshift 账号  进入控制台选择Creat your first application 下拉列表选择 PHP 5.4 填写应用名字跟自定义域名，执行 create application创建 导航菜单进入 Application 页面，进入生">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.3',
    sidebar: {"position":"left","display":"always","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://hexo.mantoujun.top/2017/04/30/Openshift-搭建-贴吧云签到/"/>





  <title>Openshift 搭建 - 贴吧云签到 | 未知领域</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">未知领域</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">女装是最吼的</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://hexo.mantoujun.top/2017/04/30/Openshift-搭建-贴吧云签到/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="pancc">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/uploads/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="未知领域">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Openshift 搭建 - 贴吧云签到</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-04-30T17:04:09+08:00">
                2017-04-30
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/PHP/" itemprop="url" rel="index">
                    <span itemprop="name">PHP</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="所需工具"><a href="#所需工具" class="headerlink" title="所需工具"></a>所需工具</h1><ul>
<li>WinSCP <a href="https://winscp.net/eng/docs/lang:chs" target="_blank" rel="noopener">官网下载</a></li>
<li>PuTTYGen <a href="http://puttygen.software.informer.com/0.6/" target="_blank" rel="noopener">官网下载</a>, <a href="http://www.softpedia.com/get/Network-Tools/Misc-Networking-Tools/PuTTY-Key-Generator.shtml" target="_blank" rel="noopener">softpedia</a></li>
<li>Tieba-Cloud-Sign <a href="https://github.com/MoeNetwork/Tieba-Cloud-Sign" target="_blank" rel="noopener">Github</a></li>
</ul>
<h1 id="步骤"><a href="#步骤" class="headerlink" title="步骤"></a>步骤</h1><ol>
<li>注册 <a href="https://www.openshift.com/" target="_blank" rel="noopener">Openshift</a> 账号 </li>
<li>进入控制台选择<code>Creat your first application</code></li>
<li>下拉列表选择 PHP 5.4</li>
<li>填写应用名字跟自定义域名，执行 <code>create application</code>创建</li>
<li>导航菜单进入 Application 页面，进入生成的应用</li>
<li>依次添加 MySQL5.5，phpmyadmin4.0，记住创建过程中绿框显示数据库管理信息</li>
<li>点击 Application 页面下方 <code>Or, see the entire list of cartridges you can add</code>，添加 Cron1.4</li>
<li>在 Cartridges 列表中， MySQL 5.5 显示<code>Database: xx User: xx Password: show</code>,点击 <code>show</code> 显示密码，并使用这个账户登录 phpmyadmin( phpMyAdmin 4.0 右方的箭头 )</li>
<li>记住右上方 <code>数据库服务器</code>的详细信息</li>
<li>用puttygen 生成 <code>公钥/私钥</code> 对,保存私钥到文件中，复制框中的公钥，进入导航菜单进入 Settings  页面,在 <code>Public Keys</code>列表下点击 <code>Add a new key...</code>，将复制框中的公钥粘贴进去</li>
<li>回到 Application 页面，进入生成的应用，点击右方链接 <code>Want to log in to your application?</code>并复制框中的字串</li>
<li>在 winscp 中见字串粘贴到主机名中，删去下方的用户名前的<code>ssh</code></li>
<li>点击高级-SSH-密钥交换，载入第10步保存的私钥文件</li>
<li>zip 下载整个代码，解压</li>
<li>然后进入 winscp，左边打开你解压的文件夹，右边依次打开 app-root/runtime/repo</li>
<li>勾选解压的内容物，上传</li>
<li>进入 Application 页面，点击右上角刷新图标重启应用</li>
<li>进入应用域名(https方式)</li>
<li>安装应用的过程中提示页面显示<code>你是在应用引擎或者不可写的主机上使用本程序吗？</code>时候<strong>选择</strong><code>不，我不是</code></li>
<li>填写数据库配置</li>
<li>设置 cron 计划任务：winscp 进入<code>进入 app-root-runtime-repo-.openshift-cron-minutely
在 winscp 中路径会显示为 / var/lib/openshift/*********/app-root/runtime/repo/.openshift/cron/minutely</code>, 新建一个 <code>xx.sh</code> 文件 ，填入 <code>php $OPENSHIFT_REPO_DIR/do.php</code></li>
<li>进应用域名(https方式)，按照引导进行设置</li>
</ol>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/PHP/" rel="tag"># PHP</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/04/30/大宇资讯与-Epic-Games-签定-UE4-游戏引擎使用授权/" rel="next" title="大宇资讯与 Epic Games 签定 UE4 游戏引擎使用授权">
                <i class="fa fa-chevron-left"></i> 大宇资讯与 Epic Games 签定 UE4 游戏引擎使用授权
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/05/02/Github 上各种开源项目/" rel="prev" title="Github 上各种开源项目">
                Github 上各种开源项目 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/uploads/avatar.jpg"
                alt="pancc" />
            
              <p class="site-author-name" itemprop="name">pancc</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">28</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">28</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">26</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          <div class="links-of-author motion-element">
            
          </div>

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#所需工具"><span class="nav-number">1.</span> <span class="nav-text">所需工具</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#步骤"><span class="nav-number">2.</span> <span class="nav-text">步骤</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2015 &mdash; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">pancc</span>

  
</div>









        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  









  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three-waves.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.3"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.3"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.3"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.3"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.3"></script>



  


  




	





  





  









<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>



  





  

  

  

  
  

  

  

  

</body>
</html>
